﻿using PLCS.Application.Contracts.MenuApp.Dtos;
using PLCS.Application.Contracts.UserApp.Dtos;
using PLCS.Client.IService.UserAuthorization;

namespace PLCS.Client.Service.UserAuthorization;

public class MenuService : BaseService<MenuDto, MenuEditDto>, IMenuService
{
    public override async Task DeleteByIdAsync(Guid Id)
    {
        RequestParam requestParam = new(method: Method.Delete, route: $"{typeof(MenuDto).Name.ToLower().Replace("dto", "")}?Id={Id}");
        var apiRes = await restClient.ExecuteAsync(requestParam);
        if (!apiRes.Status)
            throw new Exception(apiRes.Message);
    }
}